import React, { lazy, Suspense } from 'react';
// 引导导航条组件
import Mynavbar from '@/components/Mynavbar'

// 配置二级路由规则
import { Route, Switch, Redirect } from 'react-router-dom';
//引入 loading组件
import Loading from '@/components/Loading'
const Step1 = lazy(() => import('@/views/Step1'));
const Step2 = lazy(() => import('@/views/Step2'));
const Step3 = lazy(() => import('@/views/Step3'))

const Regist = () => {
    return (
        <div className='regist'>
            <Mynavbar isshow={false}>京东注册</Mynavbar>
            {/*二级组件显示的坑 */}
            <Suspense fallback={<Loading></Loading>}>
                <Switch>
                    <Route path='/regist/step1' component={Step1}></Route>
                    <Route path='/regist/step2' component={Step2}></Route>
                    <Route path='/regist/step3' component={Step3}></Route>
                    <Redirect from='/regist' to='/regist/step1' exact></Redirect>
                </Switch>
            </Suspense>
        </div>
    );
}

export default Regist;
